﻿@using UsedBookTradeSystem.Models.Entity
@using UsedBookTradeSystem.Models.Enum
<!DOCTYPE html>
<html>
<head>
 @using Microsoft.AspNetCore.Http
@using System.Security.Claims
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="Bhumlu Bootstrap admin template made using Bootstrap 4, it has tons of ready made feature, UI components, pages which completely fulfills any dashboard needs." />
    <meta name="keywords" content="Bhumlu, bootstrap admin template, bootstrap admin panel, bootstrap 4 admin template, admin template">
    <meta name="author" content="Srthemesvilla" />
    <link rel="icon" type="image/x-icon" href="~/BackRes/assets/img/favicon.ico">
    <title>@ViewBag.Title</title>

    <!-- Google fonts -->
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">

    <!-- Icon fonts -->
    <link rel="stylesheet" href="~/BackRes/assets/fonts/fontawesome.css">
    <link rel="stylesheet" href="~/BackRes/assets/fonts/ionicons.css">
    <link rel="stylesheet" href="~/BackRes/assets/fonts/linearicons.css">
    <link rel="stylesheet" href="~/BackRes/assets/fonts/open-iconic.css">
    <link rel="stylesheet" href="~/BackRes/assets/fonts/pe-icon-7-stroke.css">
    <link rel="stylesheet" href="~/BackRes/assets/fonts/feather.css">

    <!-- Core stylesheets -->
    <link rel="stylesheet" href="~/BackRes/assets/css/bootstrap-material.css">
    <link rel="stylesheet" href="~/BackRes/assets/css/shreerang-material.css">
    <link rel="stylesheet" href="~/BackRes/assets/css/uikit.css">

    <!-- Libs -->
    <link rel="stylesheet" href="~/BackRes/assets/libs/perfect-scrollbar/perfect-scrollbar.css">
    <link rel="stylesheet" href="~/BackRes/assets/libs/flot/flot.css">

</head>
<body>
    <!-- [ Layout wrapper ] Start -->
    <div class="layout-wrapper layout-2">
        <div class="layout-inner">
            <!-- [ Layout sidenav ] Start -->
            <div id="layout-sidenav" class="layout-sidenav sidenav sidenav-vertical bg-dark">
                <!-- Brand demo (see assets/css/demo/demo.css) -->
                <div class="app-brand demo" style="height:70px;">
                    <span class="app-brand-logo demo">
                        <img src="~/BackRes/assets/img/logo.png" alt="Brand Logo" class="img-fluid">
                    </span>
                    <a href="/backEnd/Index" class="app-brand-text demo sidenav-text font-weight-normal ml-2">后台管理</a>
                    <a href="javascript:" class="layout-sidenav-toggle sidenav-link text-large ml-auto">
                        <i class="ion ion-md-menu align-middle"></i>
                    </a>
                </div>
                <div class="sidenav-divider mt-0"></div>

                <!-- Links -->
                <ul class="sidenav-inner py-1">

                    <!-- Dashboards -->
                    <li class="sidenav-item active">
                        <a href="/backEnd/Index" class="sidenav-link">
                            <i class="sidenav-icon feather icon-home"></i>
                            <div>主页</div>
                        </a>
                    </li>

                    <!-- Layouts -->
                    <li class="sidenav-divider mb-1"></li>
                    <li class="sidenav-item">
                        <a href="/Category/Index" class="sidenav-link">
                            <i class="sidenav-icon lnr lnr-indent-increase"></i>
                            <div>书籍分类管理</div>
                        </a>
                    </li>
                    <li class="sidenav-item">
                        <a href="/BookInfo/Index" class="sidenav-link">
                            <i class="sidenav-icon feather icon-book"></i>
                            <div>书籍管理</div>
                        </a>
                    </li>

                    <li class="sidenav-item">
                        <a href="/User/Index" class="sidenav-link">
                            <i class="sidenav-icon feather icon-users"></i>
                            <div>用户管理</div>
                        </a>
                    </li>

                    <li class="sidenav-item">
                        <a href="/Order/Index" class="sidenav-link">
                            <i class="sidenav-icon feather icon-clipboard"></i>
                            <div>订单管理</div>
                        </a>
                    </li>

                </ul>
            </div>
            <!-- [ Layout sidenav ] End -->
            <!-- [ Layout container ] Start -->
            <div class="layout-container">
                <!-- [ Layout navbar ( Header ) ] Start -->
                <nav class="layout-navbar navbar navbar-expand-lg align-items-lg-center bg-white container-p-x" id="layout-navbar">

                    <!-- Brand demo (see assets/css/demo/demo.css) -->
                    <a href="index.html" class="navbar-brand app-brand demo d-lg-none py-0 mr-4">
                        <span class="app-brand-logo demo">
                            <img src="~/BackRes/assets/img/logo-dark.png" alt="Brand Logo" class="img-fluid">
                        </span>
                        <span class="app-brand-text demo font-weight-normal ml-2">Bhumlu</span>
                    </a>

                    <!-- Sidenav toggle (see assets/css/demo/demo.css) -->
                    <div class="layout-sidenav-toggle navbar-nav d-lg-none align-items-lg-center mr-auto">
                        <a class="nav-item nav-link px-0 mr-lg-4" href="javascript:">
                            <i class="ion ion-md-menu text-large align-middle"></i>
                        </a>
                    </div>

                    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#layout-navbar-collapse">
                        <span class="navbar-toggler-icon"></span>
                    </button>

                    <div class="navbar-collapse collapse" id="layout-navbar-collapse">
                        <!-- Divider -->
                        <hr class="d-lg-none w-100 my-2">


                        <div class="navbar-nav align-items-lg-center ml-auto">
                            <!-- Divider -->
                            <div class="demo-navbar-user nav-item dropdown">
                                <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown">
                                    <span class="d-inline-flex flex-lg-row-reverse align-items-center align-middle">
                                        <img src="~/BackRes/assets/img/avatars/1.png" class="d-block ui-w-30 rounded-circle">
                                        @if (User.Identity.IsAuthenticated)
                                        {
                                            <span class="px-1 mr-lg-2 ml-2 ml-lg-0">@User.FindFirst(ClaimTypes.Name)?.Value</span>
                                        }
                                    </span>
                                </a>
                                <div class="dropdown-menu dropdown-menu-right">
                                    <a href="/Admin/MyInfo" class="dropdown-item">
                                        <i class="feather icon-user text-muted"></i> &nbsp; 个人中心
                                    </a>
                                    <div class="dropdown-divider"></div>
                                    <a href="/Home/Logout" class="dropdown-item">
                                        <i class="feather icon-power text-danger"></i> &nbsp; 登出
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                </nav>
                <!-- [ Layout navbar ( Header ) ] End -->
                <!-- [ Layout content ] Start -->
                <div class="layout-content">
                    <!-- [ content ] Start -->
                    @RenderBody()
                    <!-- [ content ] End -->
                </div>
                <!-- [ Layout content ] Start -->
            </div>
            <!-- [ Layout container ] End -->
        </div>
        <!-- Overlay -->
        <div class="layout-overlay layout-sidenav-toggle"></div>
    </div>
    <!-- [ Layout wrapper] End -->
    <!-- Core scripts -->
    <script src="~/BackRes/assets/js/pace.js"></script>
    <script src="~/BackRes/assets/js/jquery-3.3.1.min.js"></script>
    <script src="~/BackRes/assets/libs/popper/popper.js"></script>
    <script src="~/BackRes/assets/js/bootstrap.js"></script>
    <script src="~/BackRes/assets/js/sidenav.js"></script>
    <script src="~/BackRes/assets/js/layout-helpers.js"></script>
    <script src="~/BackRes/assets/js/material-ripple.js"></script>

    <!-- Libs -->
    <script src="~/BackRes/assets/libs/perfect-scrollbar/perfect-scrollbar.js"></script>
    <script src="~/BackRes/assets/libs/eve/eve.js"></script>
    <script src="~/BackRes/assets/libs/flot/flot.js"></script>
    <script src="~/BackRes/assets/libs/flot/curvedLines.js"></script>
    <script src="~/BackRes/assets/libs/chart-am4/core.js"></script>
    <script src="~/BackRes/assets/libs/chart-am4/charts.js"></script>
    <script src="~/BackRes/assets/libs/chart-am4/animated.js"></script>

    <!-- Demo -->
    <script src="~/BackRes/assets/js/control.js"></script>
</body>
</html>
@if (TempData["OperateResult"] != null)
{
    var message = TempData["OperateResult"].ToString();
    TempData["OperateResult"] = null;
    <script type="text/javascript">
        alert('@Html.Raw(message)');
    </script>
}
